package com.shujia.interfacer;

import java.util.ArrayList;

public class Demo2 {
    public static void main(String[] args) {
        ArrayList<Double> doubles = new ArrayList<>();

        doubles.add(1.2);
        doubles.add(1.3);
        doubles.add(1.4);
        doubles.add(1.1);

        DataSet<Double> dataSet = new DataSet<Double>(doubles);


        DataSet map = dataSet.map(new Funcation<Double,Double>() {
            @Override
            public Double map(Double i) {
                return i * 2;
            }
        });

        System.out.println(map.list);

    }
}
